﻿<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>软件下载</title>
		<link rel="stylesheet" type="text/css" href="${ctx}/css/soft.css" media="screen" /></link>
		<link href="${ctx}/css/hb.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="${ctx}/scripts/jquery-1.4.4.min.js"></script>
		<script type="text/javascript">
		
	          function download(id){	          
	                location.href="${ctx}/files/Files/download.do?fileTypes=SOFT&fileName="+id;
	          }
              function viewSofts(temp,tct){     
                       
              $.get("${ctx}/files/Files/getFilesByCatId.do?tc="+tct, {
              
                   Action:"get",catId:temp}, function (data, textStatus){	   
                                               
                   var jsonData = eval("["+data+"]");  
        
                   if(jsonData == '') {return;}      
    
                   var totalsize = jsonData[0].total;          
                   var lidata = jsonData[0].rows;
                   if(lidata == undefined){return;}
                   
                   if(totalsize != 0){                     
                     $('#file_list').text('');                     
                     $('#file_list').append('<ul id="bd" class="bd">');                
       			     for(var k = 0 ; k < totalsize; k++){               		
                        var tt = (lidata[k].createTimeString).substring(0,10);
				//文件大小也在这里显示
          		 		$('#file_list').append('<li><span>'+tt+'</span><a href="javascript:viewSofts(\''+lidata[k].objId+'\',\'\');"><i>['+lidata[k].catname+']</i></a><a href="javascript:download(\''+lidata[k].id+'\');"	title="'+lidata[k].memo+'">'+lidata[k].names+'</a>&nbsp;&nbsp;('+lidata[k].filesize+'M)</li>');
          		 	 }      
        		     $('#file_list').append('</ul>');          
                   }
             
               });	
              }
              $(document).ready(function() { 	            
               $.get("${ctx}/files/FilesCategory/getCategoryList.do", {
                   Action:"get",Name:""}, function (data, textStatus){	                                
                   var objs = eval("["+data+"]");  
      
                   if(objs == '') return;
                   var size = objs[0].length;         
              
                   for(var t = 0 ; t < size ; t++){
          
           
                  		  $('#dh').append('<li class="menu_view"><a href="javascript:viewSofts(\''+objs[0][t].id+'\',\'\');" title="'+objs[0][t].name+'">'+objs[0][t].name+'</a> |</li>');
                
                   }             
               });		               
               viewSofts('','');//默认取top  ?可以在这里设置
          }); 	 

</script>
	</head>
	<body>
		<div id="wrapper">
			<div class="hb_top">
				<a href="${ctx}/"><img src="${ctx}/images/web/first_ico.jpg" />返回首页</a>
				<!--a
					href="#"><img src="${ctx}/images/web/tianjia_sc.jpg" />返回首页</a><a
					href="#"><img src="${ctx}/images/web/lx_my.jpg" />返回首页</a-->
			</div>
			 <div style="height:289px"  class="top" ><img  src="${ctx}/images/soft/top.jpg" />  </div>
			<div style="height:70px" class="meun">
				<div id="dh" class="dh" style="width:850px">
					<li class="menu_view">
						<a href="javascript:viewSofts('','');" title="全部软件">全部软件</a>
						|
					</li>


				</div>
			</div>
			<!--main end-->
			<!--category end-->
			<div style="height:1100px" id= "soft-list-txt" class="soft-list-txt">
				<div class="G-title">
					<h3><a href="javascript:viewSofts('','');" title="最近更新">全部软件</a></h3>
				</div>
				
			    <div id="file_list">
					 	<ul id="bd" class="bd"></ul>
				</div>
			
			</div>
	</body>
</html>
<!-- Waptw-Moniter -->